1. Field of the Invention
Methods and apparatuses consistent with the present invention relate to a loop coalescing device, and more particularly, to loop coalescing of nested loops.
2. Description of the Related Art
An ultimate objective of processor developers is to operate processors at relatively higher speeds. To this purpose, processor developers have focused their studies on technologies for enabling processors to perform a plurality of instructions in parallel.
Of these technologies, a software pipeline technology which enables a processor to perform a plurality of instructions in parallel has been proposed. In the software pipeline technology, performance of instructions is partially divided into several steps, which are called stages. Each instruction is sequentially processed through the respective stages. Since each instruction is performed in parallel in the stage having a number of instruction operations, processing speed of the instruction is increased.
However, in order to effectively utilize the software pipeline technology, it is required that a program including nested loops is coalesced into an inner-most loop.
Further, in the software pipeline technology, the processing speed of the instructions may be limited. Specifically, one of the main reasons for a reduction of the processing speed of the instructions is a change in the flow of a program, dependency of data, and the like.
The change in the flow of the program may be caused by a conditional statement. As the number of branches of conditional statements increases, the processing speed of the instructions is reduced. Accordingly, there is a great need for reducing the number of branches of the conditional statements.
Also, there are many cases where a complex operation is required to determine conditions for the conditional statements. Particularly, when the condition has an operation such as modulo, an overhead of the processor is increased.
Therefore, there is a great need for an effective loop coalescing method and a loop coalescing device which can replace a condition for a conditional statement with a simple operation.